package com.mrjy.coursepackage.dao;

import com.mrjy.common.entity.CoursePackageVip;
import com.mrjy.coursepackage.dto.CoursePackageInfoDTO;
import com.mrjy.coursepackage.dto.CoursePackageVipDTO;

import java.util.List;
import java.util.Map;



/**
 * CoursePackageVipDAO接口
 * <br>
 * <b>功能：</b>CoursePackageVipDao<br>
 */
public interface ICoursePackageVipDao {
	/**
	 * 新增
	 * @param vip
	 * @return
	 */
	public Integer insert(CoursePackageVip vip);
	/**
	 * 全部修改，不管值是否为空
	 * @param vip
	 * @return
	 */
	public Integer update(CoursePackageVip vip);
	/**
	 * 只修改不为空的值
	 * @param vip
	 * @return
	 */
	public Integer updateById(CoursePackageVip vip);
	/**
	 * 删除
	 * @param id
	 * @return
	 */
	public Integer delete(Integer id);
	/**
	 * 通过id查询数据
	 * @param id
	 * @return
	 */
	public CoursePackageVip selectById(Integer id);
	/**
	 * 查询list
	 * @param vip
	 * @return
	 */
	public List<CoursePackageVip> selectPageByEntity(CoursePackageVip vip);
	
	public List<CoursePackageVip> isCoursePackageVip(CoursePackageVip info);
	
	public CoursePackageVip selectByUserIdAndCoursepackageId(CoursePackageVip paramVip);
	
	public void updateCheckCoursePackageVipExpired();
	
	public int updateCoursePackageVipExpired();
	
	public List<CoursePackageVipDTO> selectCoursePackageVipExpired();
	
	public List<CoursePackageVipDTO> selectCoursePackageVipWillExpire(int numDate);
	
	public List<CoursePackageVipDTO> isCoursePackageVipByVideoIdAndUserId(CoursePackageVipDTO info);
	
	public List<CoursePackageVip> selectVipByUserId(Integer id);
	public int hasPayCoursepackage(Integer userId);
	public List<CoursePackageInfoDTO> queryUserPaidCPByUserid(CoursePackageVip vip);
	public int queryCountUserPaidCPByUserid(CoursePackageVip vip);
	
	List<Map<String, Object>> queryUserPaid();
	public List<CoursePackageVipDTO> queryWhoPayByCoursePackageId(CoursePackageVip vip);

    int queryByCount(CoursePackageVip vip);
}
